import Vue from 'vue'
import Router from 'vue-router'


import HomeContainer from '@/components/tabbar/HomeContainer.vue'
import MemberContainer from '@/components/tabbar/MemberContainer.vue'
import ShopcarContainer from '@/components/tabbar/ShopcarContainer.vue'
import SearchContainer from '@/components/tabbar/SearchContainer.vue'

import newslist from '@/components/news/newslist.vue'
import newsinfo from '@/components/news/newsinfo.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect : '/home'
    },
    {
      path: '/home',
      name: 'HomeContainer',
      component: HomeContainer
    },
    {
      path: '/member',
      name: 'MemberContainer',
      component: MemberContainer
    },
    {
      path: '/shopcar',
      name: 'ShopcarContainer',
      component: ShopcarContainer
    },
    {
      path: '/search',
      name: 'SearchContainer',
      component: SearchContainer
    },
    {
      path: '/home/newslist',
      name: 'newslist',
      component: newslist
    },
    {
      path: '/home/newsinfo/:aid',
      name: 'newsinfo',
      component: newsinfo
    }
  ],
  linkActiveClass : 'mui-active'//覆盖默认的路由高亮的类，默认的类叫router-link-active

})
